The present invention relates to a method and a device of programming an industrial controller for controlling an automated installation, and more particularly to a method and a device using a debugging tool to facilitate analysis of the resulting controller program.
In the world today, many technical processes run automated or at least partially automated. Examples can be found at industrial manufacturing sites and production plants, but also in daily life situations at the luggage claim of airports, ski lifts in skiing resorts, roller coasters at entertainment parks etc. Machines and other components of such an installation are operated by industrial controllers which receive and process sensor data from sensors in the installation and which produce control signals for driving actuators in the installation. For example, the operational position of a robot arm may be automatically controlled as a function of sensor data representing an instantaneous position of the robot arm and as a function of a desired trajectory of the robot arm defined by a control program. The control signals generated by the controller energize an electrical drive which moves the robot arm in the desired direction. The control operations for controlling the robot arm may be very complex. Nevertheless, it is desired to have a high flexibility in the control process. Therefore, it is typical to use programmable controllers, i.e. controllers where the control logic is determined by a software which is typically called the application program.
There are a number of special purpose programming languages that are typically used for programming industrial controllers. In particular, international standard IEC 61131 defines several programming languages. These programming languages are high level programming languages in terms of the present invention, because they do not result in a machine code program which is executable on a specific controller. Rather, a program written in a-the high level programming languages has to be translated into a lower level machine code program in order to be executable on a specific controller. The translation process may comprise several stages including intermediate level program code. For sake of simplicity, the term “compiler” is used here for any kind of suitable translator including line-by-line translators (interpreters) and other kinds of translators. Likewise, the term “machine code program” is used here for any lower level program code which is the result of a translation process and which may be run on a controller or an equivalent machine that is capable of providing true sensor data from a controlled process or installation.
Use of a high level programming language greatly facilitates the process of programming an industrial controller, because the high level programming language provides a plurality of high level control instructions which allow a programmer to focus on the control problem and the control logic rather than the practical implementation on a specific hardware of a controller. Accordingly, high level programming languages are widely used.
Nevertheless, control programs for modern highly automated control applications can be very complex, and it is often difficult to identify programming errors. Therefore, it is common to use debugging tools. A debugging tool or debugger is a special computer program that is used in the process of finding programming errors in other programs, such as the application program. Typically, a debugging tool allows the application program, which is to be debugged, to run in a step-by-step mode (single-step) and/or with what is called breakpoints. A breakpoint is a special stop command not used in the normal course of the application program, which stop command allows the application program under examination to stop and pause at the breakpoint so that the programmer has sufficient time to check the status achieved by the application program at said breakpoint.
EP 1 184 758 A2 discloses an approach for debugging an application program for an industrial controller, wherein a single-step mode and/or a breakpoint mode can be used not only at the level of the machine code, but also at the level of the high level programming language, and in particular on a flow chart level. Accordingly, programming errors can be searched for at different levels, which allegedly facilitates error detection.
DE 10 2004 062 852 A1 discloses an industrial controller having an integrated debugging function. The integrated debugger allows to run the application program step-by-step and/or using breakpoints, as described above. However, there may be situations where a controlled process may not be interrupted in order to avoid, for instance, uncontrolled machine movements. Therefore, DE 10 2004 062 852 A1 proposes breakpoints which can be selectively activated or deactivated.
DE 10 2004 062 852 A1 thus addresses a fundamental problem which is specific for debugging application programs for industrial controllers in contrast to debugging computer programs for desktop applications, for instance, namely limitations resulting from the inability to stop a controlled installation at any instance of time. It is not uncommon that a complex control program for an industrial controller can only be debugged in a simulation run, i.e. without actually moving or otherwise controlling the installation.
Moreover, it can still be a very time consuming and grueling process to debug a complex control program for an industrial controller using existing debugging tools.